﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Input;

namespace XNA_TD.Menue
{
    class GameStartMenue : GUI
    {
        private Texture2D texture = null;

        public GameStartMenue()
        {
            size = new Rectangle();
            texture = Content.Load<Texture2D>("Menue/start");
            size.Height = texture.Height / 2;
            size.Width = texture.Width / 2;
            Resize();
        }

        public override void Resize()
        {
            size.X = 10;
            size.Y = graphics.GraphicsDevice.Viewport.Height - size.Height - 10;
        }

        public override void MouseClick()
        {
            gameSpeed = 1;
            new GeschwindigkeitsMenue();
            UnRegister(this);
        }

        public override void Draw()
        {
            var depthStencilState = graphics.GraphicsDevice.DepthStencilState;
            spriteBatch.Begin();
            spriteBatch.Draw(texture, size, Color.White);
            spriteBatch.End();
            graphics.GraphicsDevice.DepthStencilState = depthStencilState;
        }
    }
}
